<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body onmousemove="method01(event)" style="width: 500px;height: 500px;border: red solid 1px ;margin: 0">
x:<span id="mx"></span>   y:<span id="my"></span>
</body>
<script>

  function method01(event){
      console.log(event);
      console.log(event.x +"  "+event.y);
      let mx = document.getElementById("mx");
      let my = document.getElementById("my");
      mx.innerHTML = event.x;
      my.innerHTML = event.y;

  }
</script>
</html>